<?php require __DIR__ . '/../inc_header.tpl.php';?>

<span class="layui-breadcrumb">
    <a href="<?php echo url(['platform','platform','index']);?>">控制台</a>
    <a href="">应用模块</a>
    <a><cite>未安装应用</cite></a>
</span>

<div class="layui-tab layui-tab-brief">
  <ul class="layui-tab-title">
    <li><a href="<?php echo url(['platform','app','installed_list']);?>">已安装应用</a></li>
    <li class="layui-this"><a class="layui-this" href="<?php echo url(['platform','app','not_installed_list']);?>">未安装应用</a></li>
  </ul>
</div>    
<br>
     
<div class="layui-card">
    <div class="layui-card-header">应用模块</div>
    <div class="layui-card-body">
        
        <div style="padding: 20px; ">
            <div class="layui-row layui-col-space15">

                <?php
                foreach($dir_app as $row){
                ?>
                    <div class="layui-col-sm12 layui-col-md6" style="background-color: #F2F2F2;">
                        <div class="layui-card">
                            <div class="layui-card-header">
                                <?php echo  $row['name']; ?>
                                <span class="layui-badge layui-bg-blue" style="position: absolute;right: 15px; top: 12px;"><?php echo $row['identifie']; ?></span>                       
                            </div>
                            <div class="layui-card-body" style="height:100px">

                                <div class="layui-row">
                                    <div class="layui-col-xs4 layui-col-md3">
                                        <img src="./application/<?php echo $row['identifie'] .'/'. $row['icon']; ?>" style="width:60px;height:60px" loading="lazy">
                                    </div>
                                    <div class="layui-col-xs8  layui-col-md9">
										<div  style="height:50px;display: -webkit-box;overflow:hidden;-webkit-box-orient: vertical;-webkit-line-clamp: 2;color:#666;" title="<?php echo $row['description']; ?>"><?php echo $row['description']; ?></div>
                                        <hr>
                                        <div style="text-align: center">
                                            <a href="<?php echo url(['platform','app','not_installed_do_install'] , ['app_name'=> $row['identifie'] ] ); ?>"  class="layui-btn layui-btn-sm">安装</a>
                                        </div>
                                    </div>
                                </div>


                            </div>
                        </div>
                    </div>        
                    <?php
                }
                ?>
            </div>
        </div>        
        
    </div>
</div>


<?php require __DIR__ . '/../inc_footer.tpl.php';?>